<!doctype html>
<html><head><meta charset="utf-8">
<title>SIFT: Scale Invariant Feature Transform</title>
<link rel="stylesheet" href="/stylesheets/styles.css">
<link rel="stylesheet" href="/stylesheets/coderay.css">
<script src="/javascripts/scale.fix.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-303081-6']);
_gaq.push(['_trackPageview']);
(function() {
	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head><body><div class="wrapper">
<header><h1><a href="/">ccv</a></h1>
<p>A Modern Computer Vision Library</p>
<p class="view"><a href="https://github.com/liuliu/ccv">View the Project on GitHub <small>liuliu/ccv</small></a></p>
<ul>
<li><a href="https://github.com/liuliu/ccv/zipball/stable">Download <strong>ZIP File</strong></a></li>
<li><a href="https://github.com/liuliu/ccv/tarball/stable">Download <strong>TAR Ball</strong></a></li>
<li><a href="https://github.com/liuliu/ccv">Fork On <strong>GitHub</strong></a></li>
</ul>
</header>
<section><h1>SIFT: Scale Invariant Feature Transform</h1>
<p><a href="/lib/ccv-sift/">Library Reference: ccv_sift.c</a></p>

<h2 id="whats-sift">What’s SIFT?</h2>

<p>SIFT paper refers to:
Distinctive Image Features from Scale-Invariant Keypoints, David G. Lowe</p>

<p>The current implementation in ccv was largely influenced by VLFeat:
http://www.vlfeat.org/</p>

<h2 id="how-to-run-the-sample-program">How to run the sample program?</h2>

<p>There is a sample program under bin/siftmatch that at your disposal, to run it,
just simply type:</p>

<pre><code>./siftmatch ../samples/book.png ../samples/scene.png
</code></pre>

<p>The output may not be most interesting thing for you, want to see some images?
There is siftdraw.rb script to do that, pipe the command:</p>

<pre><code>./siftmatch ../samples/book.png ../samples/scene.png | ./siftdraw.rb ../samples/book.png ../samples/scene.png output.png
</code></pre>

<p>Check out output.png, there are interesting lines between the book and the scene.</p>

<p>There is a way to show more amazing result, but with a little external help,
a program called homest (http://www.ics.forth.gr/~lourakis/homest/), it may
requires levmar program (http://www.ics.forth.gr/~lourakis/levmar/) as well.
compile homest until you get the homest_demo binary somewhere, and pipe the command
like this:</p>

<pre><code>./siftmatch ../samples/book.png ../samples/scene.png | ./siftdraw.rb ../samples/book.png ../samples/scene.png output.png &lt;directory to homest&gt;/homest_demo
</code></pre>

<p>You see, somehow, SIFT recognized the book in the scene, amazing, ah?</p>

<p>I haven’t decided yet that if I need to include some functions like ccv_find_homography
in the future release, homest is a good research package but for industrial use, I have
some doubts.</p>

<h3><a href="/">&lsaquo;&nbsp;&nbsp;back&nbsp;</a></h3>
<div id="disqus_thread"></div>
<script type="text/javascript">
	var disqus_shortname = 'libccv';
	(function() {
		var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
		dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
		(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
	})();
</script>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>

</section>
<footer>
<p>This project is maintained by <a href="https://liuliu.me/">liuliu</a></p>
<p><small>Theme originated from <a href="https://github.com/orderedlist">orderedlist</a></small></p>
</footer>
</div>
<!--[if !IE]><script>fixScale(document);</script><!--<![endif]-->
</body>
</html>
